--- title: dashboards keywords: fastai sidebar: home_sidebar summary: "Supplies dashboards to investigate datasets and training results. Dashboards are defined as classes, to show the dashboard use the .show() function on an dashboard instance." description: "Supplies dashboards to investigate datasets and training results. Dashboards are defined as classes, to show the dashboard use the .show() function on an dashboard instance." nb_path: "nbs/dashboards.ipynb" ---
pn.extension()
import icedata
test_data_dir = icedata.fridge.load_data()
test_class_map = icedata.fridge.class_map()
test_parser = icedata.fridge.parser(test_data_dir, test_class_map)
test_train_records, test_valid_records = test_parser.parse()
dso = DatasetOverview(test_valid_records, class_map=test_class_map, height=500)
dso.show()
dso = DatasetOverview(data=aggregate_record_data(test_valid_records, test_class_map), class_map=test_class_map, height=700, width=500)
dso.show()
test_dataset = aggregate_record_data(test_valid_records, test_class_map)
mdo = MultiDatasetOverview([test_dataset.iloc[:10], test_dataset.iloc[:50], test_dataset.iloc[:60], test_dataset], width=500, height=500)
mdo.show()
mdo_empty = MultiDatasetOverview([])
assert mdo_empty.show() is None
dump_var = []
ds_filter = DatasetFilter(test_valid_records, test_class_map, export_variable=dump_var, width=700, height=500).show()
# trigger click event to test if record is added to dump_var
ds_filter[-1].clicks += 1
assert len(dump_var) == 1
assert len(dump_var[0]["records"]) == len(test_valid_records)
ds_filter
dump_var = []
dstoes_filter = DatasetFilterThatOnlyExportsStats(test_valid_records, test_class_map, export_variable=dump_var).show()
# trigger click event to test if record is added to dump_var
dstoes_filter[-1].clicks += 1
assert len(dump_var) == 1
assert isinstance(dump_var[0], pd.DataFrame)
dstoes_filter
dsc = DatasetCreator(test_valid_records, test_class_map)
dsc.show()
tvr_comp = TrainValRecordsComparison(test_train_records, test_valid_records, test_class_map)
tvr_comp.show()